
<%@ page contentType="text/html;charset=UTF-8" language="java" isErrorPage="true" %>
<html>
<head>
    <title>Title</title>
    <script>
        var info = "${info}";
        switch (info) {
            case "infofail":
                alert("信息有误，请重新填写!");
                window.location = "index.jsp";
                break;
            case "haved":
                alert("已存在该用户，请返回登录页面！");
                window.location = "index.jsp";
                break;
            case "nohaved":
                alert("不存在该用户，请返回登录页面进行注册");
                window.location = "index.jsp";
                break;
            case "addstudent":
                alert("已经存在该用户名，请返回!");
                location.href = "/admin?page=1&method=studentinfo";
                break;
            case "addteacher":
                alert("已经存在该用户名，请返回!");
                location.href = "/admin?method=teacher";
        }
    </script>
</head>
<body>
</body>
</html>
